package com.open.shitou.activity;

import android.app.Application;

import com.open.shitou.bean.MyUser;
import com.open.shitou.presenter.GoodsPresenter;
import com.open.shitou.presenter.UserPresenter;
import com.orhanobut.logger.AndroidLogAdapter;
import com.orhanobut.logger.FormatStrategy;
import com.orhanobut.logger.Logger;
import com.orhanobut.logger.PrettyFormatStrategy;

import cn.bmob.v3.Bmob;
import cn.bmob.v3.BmobUser;

/**
 * Created by hailongqiu on 2018/2/25.
 */

public class ShiTouApplication extends Application {
    /**
     * SDK初始化也可以放到Application中
     */
    public static String APPID = "6acdd9f80429273bd47c85df05f53909";

    @Override
    public void onCreate() {
        super.onCreate();
        // autolayout
//        AutoLayoutConifg.getInstance().useDeviceSize();
        // 初始化bmob.
        Bmob.initialize(this, APPID);
        // log初始化.
        FormatStrategy formatStrategy = PrettyFormatStrategy.newBuilder()
                .tag("hailongqiu")
                .build();
        Logger.addLogAdapter(new AndroidLogAdapter(formatStrategy));
        // 222478
//        final MyUser bmobUser = BmobUser.getCurrentUser(MyUser.class);
        GoodsPresenter goodsPresenter = new GoodsPresenter();
//        goodsPresenter.getUserAllGoods(BmobUser.getCurrentUser(MyUser.class));
        goodsPresenter.getUserTypeGoods(BmobUser.getCurrentUser(MyUser.class), GoodsPresenter.YU_SHI_TYPE);
//        userPresenter.pushGoods();
////        userPresenter.requestSMSCode("13281002538");
//        userPresenter.signOrLogin("13281002538", "222478");
    }

}
